Rvest package. You can find more information about the package here
https://en.wikipedia.org/wiki/List_of_most-liked_YouTube_videos and find the Xpath that corresponds to the whole table on the right side of the screen.
read_html(), html_nodes() and html_table() functions. You can read more about them in the Help panel in R studio or by calling them preceded by two question marks, e.g. ??read_html().